package com.dnjn.happiness.biz.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dnjn.happiness.biz.domain.vo.CommunicateTagsJsonVO;
import com.dnjn.happiness.biz.domain.vo.CommunicateTagsVO;
import com.dnjn.happiness.common.core.annotation.Excel;
import com.dnjn.happiness.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.time.LocalDate;
import java.util.List;


/**
 * 沟通对象 biz_communicate
 *
 * @author happiness
 * @date 2023-10-28
 */
@Schema(name = "Communicate", description = "沟通")
@Accessors(chain = true)
@Getter
@Setter
@TableName("biz_communicate")
public class Communicate extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * PK
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "communicate_id", type = IdType.ASSIGN_ID)
    private Long communicateId;

    
    

    /**
     * $column.columnComment
     */
    @Schema(description = "沟通发起人")
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long fromUserId;

    /**
     * 被沟通人id
     */
    @Schema(description = "被沟通人id")
    @Excel(name = "被沟通人id")
    private Long userId;


    /**
     * 实际执行沟通人id
     */
    @Schema(description = "实际执行沟通人id")
    @Excel(name = "实际执行沟通人id")
    private Long operUserId;

    /**
     * 关联问卷id
     */
    @Schema(description = "关联问卷id")
    @Excel(name = "关联问卷id")
    private Long surveyId;

    /**
     * SURVEY-问卷 INTERVIEW-访谈
     */
    @Schema(description = "SURVEY-问卷 INTERVIEW-访谈")
    @Excel(name = "SURVEY-问卷 INTERVIEW-访谈")
    private String communicateType;

    /**
     * 已指派 已结束
     */
    @Schema(description = "已指派 已结束")
    @Excel(name = "已指派 已结束")
    private String communicateStatus;

    /**
     * $column.columnComment
     */
    @Schema(description = "开始时间")
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String dateStart;

    /**
     * $column.columnComment
     */
    @Schema(description = "结束时间")
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String dateEnd;

    /**
     * 沟通结果
     */
    @Schema(description = "沟通结果")
    @Excel(name = "沟通结果")
    private String result;

    /**
     * $column.columnComment
     */
    @Schema(description = "情绪id")
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long etypeId;

    /**
     * 是否删除|0-否 1-是|valid
     */
    @Schema(description = "是否删除|0-否 1-是|valid")
    @Excel(name = "是否删除|0-否 1-是|valid")
    private String deleted;

    private Integer likeCounts;//点赞星星

    private Integer happyWhenCommunicating;// 填写沟通结果之前的快乐分

    @TableField(exist = false)
    private List<CommunicateTagsJsonVO> communicateTagsJsonVOList;

    @Schema(description = "七天快乐值")
    @TableField(exist = false)
    private List<CommunicateRecordBean> weekScore;

    @Schema(description = "沟通维度id和label")
    private String communicateTags;

    @Schema(description = "是否精准 Y | N")
    private String isPrecise;

    @Schema(description = "评分: SABCD")
    private String grade;


    @Schema(description = "情绪类型")
    @TableField(exist = false)
    private String etype;

    @Schema(description = "情绪label")
    @TableField(exist = false)
    private String label;

    @Schema(description = "情绪分数")
    @TableField(exist = false)
    private String score;

    @TableField(exist = false)
    private String surveyTitle;

    @TableField(exist = false)
    private String surveyDescription;

    @TableField(exist = false)
    private String gouTongUsername;

    @TableField(exist = false)
    private String gouTongNickname;

    @TableField(exist = false)
    private String operName;

    @TableField(exist = false)
    private String operNickName;
    @TableField(exist = false)
    private List<String> date;

    @TableField(exist = false)
    private String operDeptId;

    @TableField(exist = false)
    private String operDeptName;

    @TableField(exist = false)
    private String userDeptId;

    @TableField(exist = false)
    private String userDeptName;


    @TableField(exist = false)
    private String gouTongDeptId;
    @Schema(description = "发起人头像")
    @TableField(exist = false)
    private String avatar;
    @Schema(example = "沟通人头像")
    @TableField(exist = false)
    private String gouTongAvatar;

    @TableField(exist = false)
    private String empDate;

    @TableField(exist = false)
    private String type;

    /**
     * 被沟通人姓名
     */
    @TableField(exist = false)
    private String nickName;

    /**
     * 被沟通人快乐值
     */
    @TableField(exist = false)
    private Integer happinessScore;

    /**
     * 被沟通人欢乐豆
     */
    @TableField(exist = false)
    private Integer hlbean;

    private Integer communicateResultAddScore;

    private Integer communicateDefult;

    private String communicateResultAddDeleted;

    @Schema(description = "添加默认分数时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String scoreTime;

    @TableField(exist = false)
    private LocalDate currDate;

    /**
     * 是否查看所有
     */
    @TableField(exist = false)
    private Boolean whetherAllPermissions;

    @TableField(exist = false)
    private Long deptId;

    @TableField(exist = false)
    private Long teamId;

    @TableField(exist = false)
    private List<CommunicateTagsVO> voList;
}
